﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeCircArc3d : OdGeCurve3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeCircArc3d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeCircArc3d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeCircArc3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeCircArc3d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeCircArc3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeCircArc3d() : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCircArc3d(OdGeCircArc3d source) : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_1(OdGeCircArc3d.getCPtr(source)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCircArc3d(OdGePoint3d center, OdGeVector3d normal, double radius) : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_2(OdGePoint3d.getCPtr(center), OdGeVector3d.getCPtr(normal), radius), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCircArc3d(OdGePoint3d center, OdGeVector3d normal, OdGeVector3d refVec, double radius, double startAng, double endAng) : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_3(OdGePoint3d.getCPtr(center), OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(refVec), radius, startAng, endAng), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCircArc3d(OdGePoint3d center, OdGeVector3d normal, OdGeVector3d refVec, double radius, double startAng) : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_4(OdGePoint3d.getCPtr(center), OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(refVec), radius, startAng), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCircArc3d(OdGePoint3d center, OdGeVector3d normal, OdGeVector3d refVec, double radius) : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_5(OdGePoint3d.getCPtr(center), OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(refVec), radius), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCircArc3d(OdGePoint3d startPoint, OdGePoint3d secondPoint, OdGePoint3d endPoint) : this(GlobalsPINVOKE.new_OdGeCircArc3d__SWIG_6(OdGePoint3d.getCPtr(startPoint), OdGePoint3d.getCPtr(secondPoint), OdGePoint3d.getCPtr(endPoint)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint3d closestPointToPlane(OdGePlanarEnt plane, OdGePoint3d pointOnPlane, OdGeTol tol)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeCircArc3d_closestPointToPlane__SWIG_0(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), OdGePoint3d.getCPtr(pointOnPlane), OdGeTol.getCPtr(tol)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d closestPointToPlane(OdGePlanarEnt plane, OdGePoint3d pointOnPlane)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeCircArc3d_closestPointToPlane__SWIG_1(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), OdGePoint3d.getCPtr(pointOnPlane)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLinearEnt3d line, out int numInt, OdGePoint3d p1, OdGePoint3d p2, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_intersectWith__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLinearEnt3d line, out int numInt, OdGePoint3d p1, OdGePoint3d p2)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_intersectWith__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeCircArc3d arc, out int numInt, OdGePoint3d p1, OdGePoint3d p2, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_intersectWith__SWIG_2(this.swigCPtr, OdGeCircArc3d.getCPtr(arc), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeCircArc3d arc, out int numInt, OdGePoint3d p1, OdGePoint3d p2)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_intersectWith__SWIG_3(this.swigCPtr, OdGeCircArc3d.getCPtr(arc), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGePlanarEnt plane, out int numInt, OdGePoint3d p1, OdGePoint3d p2, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_intersectWith__SWIG_4(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGePlanarEnt plane, out int numInt, OdGePoint3d p1, OdGePoint3d p2)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_intersectWith__SWIG_5(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool projIntersectWith(OdGeLinearEnt3d line, OdGeVector3d projDir, out int numInt, OdGePoint3d pntOnArc1, OdGePoint3d pntOnArc2, OdGePoint3d pntOnLine1, OdGePoint3d pntOnLine2, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_projIntersectWith__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeVector3d.getCPtr(projDir), out numInt, OdGePoint3d.getCPtr(pntOnArc1), OdGePoint3d.getCPtr(pntOnArc2), OdGePoint3d.getCPtr(pntOnLine1), OdGePoint3d.getCPtr(pntOnLine2), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool projIntersectWith(OdGeLinearEnt3d line, OdGeVector3d projDir, out int numInt, OdGePoint3d pntOnArc1, OdGePoint3d pntOnArc2, OdGePoint3d pntOnLine1, OdGePoint3d pntOnLine2)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_projIntersectWith__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeVector3d.getCPtr(projDir), out numInt, OdGePoint3d.getCPtr(pntOnArc1), OdGePoint3d.getCPtr(pntOnArc2), OdGePoint3d.getCPtr(pntOnLine1), OdGePoint3d.getCPtr(pntOnLine2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool tangent(OdGePoint3d point, OdGeLine3d line, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_tangent__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(point), OdGeLine3d.getCPtr(line), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool tangent(OdGePoint3d point, OdGeLine3d line)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_tangent__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(point), OdGeLine3d.getCPtr(line));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool tangent(OdGePoint3d point, OdGeLine3d line, OdGeTol tol, out OdGe.ErrorCondition status)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_tangent__SWIG_2(this.swigCPtr, OdGePoint3d.getCPtr(point), OdGeLine3d.getCPtr(line), OdGeTol.getCPtr(tol), out status);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getPlane(OdGePlane plane)
		{
			GlobalsPINVOKE.OdGeCircArc3d_getPlane(this.swigCPtr, OdGePlane.getCPtr(plane));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isInside(OdGePoint3d point, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_isInside__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(point), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isInside(OdGePoint3d point)
		{
			bool result = GlobalsPINVOKE.OdGeCircArc3d_isInside__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(point));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d center()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeCircArc3d_center(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d normal()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeCircArc3d_normal(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d refVec()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeCircArc3d_refVec(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double radius()
		{
			double result = GlobalsPINVOKE.OdGeCircArc3d_radius(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double startAng()
		{
			double result = GlobalsPINVOKE.OdGeCircArc3d_startAng(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double endAng()
		{
			double result = GlobalsPINVOKE.OdGeCircArc3d_endAng(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d startPoint()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeCircArc3d_startPoint(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d endPoint()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeCircArc3d_endPoint(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d setCenter(OdGePoint3d center)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_setCenter(this.swigCPtr, OdGePoint3d.getCPtr(center)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d setAxes(OdGeVector3d normal, OdGeVector3d refVec)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_setAxes(this.swigCPtr, OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(refVec)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d setRadius(double radius)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_setRadius(this.swigCPtr, radius), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d setAngles(double startAng, double endAng)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_setAngles(this.swigCPtr, startAng, endAng), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d set(OdGePoint3d center, OdGeVector3d normal, double radius)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_set__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(center), OdGeVector3d.getCPtr(normal), radius), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d set(OdGePoint3d center, OdGeVector3d normal, OdGeVector3d refVec, double radius, double startAng, double endAng)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_set__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(center), OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(refVec), radius, startAng, endAng), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d set(OdGePoint3d startPoint, OdGePoint3d secondPoint, OdGePoint3d endPoint)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_set__SWIG_2(this.swigCPtr, OdGePoint3d.getCPtr(startPoint), OdGePoint3d.getCPtr(secondPoint), OdGePoint3d.getCPtr(endPoint)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d set(OdGePoint3d startPoint, OdGePoint3d secondPoint, OdGePoint3d endPoint, out OdGe.ErrorCondition status)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_set__SWIG_3(this.swigCPtr, OdGePoint3d.getCPtr(startPoint), OdGePoint3d.getCPtr(secondPoint), OdGePoint3d.getCPtr(endPoint), out status), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d set(OdGeCurve3d curve1, OdGeCurve3d curve2, double radius, out double param1, out double param2, out bool success)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_set__SWIG_4(this.swigCPtr, OdGeCurve3d.getCPtr(curve1), OdGeCurve3d.getCPtr(curve2), radius, out param1, out param2, out success), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d set(OdGeCurve3d curve1, OdGeCurve3d curve2, OdGeCurve3d curve3, out double param1, out double param2, out double param3, out bool success)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_set__SWIG_5(this.swigCPtr, OdGeCurve3d.getCPtr(curve1), OdGeCurve3d.getCPtr(curve2), OdGeCurve3d.getCPtr(curve3), out param1, out param2, out param3, out success), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCircArc3d Assign(OdGeCircArc3d arc)
		{
			OdGeCircArc3d result = new OdGeCircArc3d(GlobalsPINVOKE.OdGeCircArc3d_Assign(this.swigCPtr, OdGeCircArc3d.getCPtr(arc)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getGeomExtents(OdGeExtents3d extents)
		{
			GlobalsPINVOKE.OdGeCircArc3d_getGeomExtents(this.swigCPtr, OdGeExtents3d.getCPtr(extents));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
